﻿using AutoMapper;
using BCDto.Common.Area;
using BCEntity.Common.Area;
using System;
using System.Collections.Generic;
using System.Text;

namespace BCService.MapperProfiles.Common.Area
{
    public class AreaProfile : Profile
    {
        public AreaProfile()
        {
            CreateMap<ProvinceEntity, ProvinceDto>().IgnoreAllPropertiesWithAnInaccessibleSetter();
            CreateMap<ProvinceDto, ProvinceEntity>().IgnoreAllPropertiesWithAnInaccessibleSetter();
            CreateMap<ProvinceRequestDto, ProvinceEntity>().IgnoreAllPropertiesWithAnInaccessibleSetter();
            CreateMap<ProvinceRequestDto, ProvincePutDto>().IgnoreAllPropertiesWithAnInaccessibleSetter();
            CreateMap<ProvincePutDto, ProvinceEntity>().IgnoreAllPropertiesWithAnInaccessibleSetter();

            CreateMap<CityEntity, CityDto>().IgnoreAllPropertiesWithAnInaccessibleSetter();
            CreateMap<CityDto, CityEntity>().IgnoreAllPropertiesWithAnInaccessibleSetter();
            CreateMap<CityRequestDto, CityEntity>().IgnoreAllPropertiesWithAnInaccessibleSetter();
            CreateMap<CityRequestDto, CityPutDto>().IgnoreAllPropertiesWithAnInaccessibleSetter();
            CreateMap<CityPutDto, CityEntity>().IgnoreAllPropertiesWithAnInaccessibleSetter();

            CreateMap<CountyEntity, CountyDto>().IgnoreAllPropertiesWithAnInaccessibleSetter();
            CreateMap<CountyDto, CountyEntity>().IgnoreAllPropertiesWithAnInaccessibleSetter();
            CreateMap<CountyRequestDto, CountyEntity>().IgnoreAllPropertiesWithAnInaccessibleSetter();
            CreateMap<CountyRequestDto, CountyPutDto>().IgnoreAllPropertiesWithAnInaccessibleSetter();
            CreateMap<CountyPutDto, CountyEntity>().IgnoreAllPropertiesWithAnInaccessibleSetter();

            CreateMap<ProvinceCityDto, ProvinceCityEntity>().IgnoreAllPropertiesWithAnInaccessibleSetter();
            CreateMap<ProvinceCityEntity, ProvinceCityDto>().IgnoreAllPropertiesWithAnInaccessibleSetter();
            CreateMap<ProvinceEntity, ProvinceCityEntity>().IgnoreAllPropertiesWithAnInaccessibleSetter();
        }
    }
}
